package org.huatek.anders.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import org.huatek.anders.entity.OrderEntity;
import org.huatek.anders.service.RefundNotifySenderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author anders
 * @date 2018-11-16 14:49
 **/
@RestController
public class RefundNotifySenderController {
    @Reference
    RefundNotifySenderService refundNotifySenderService;

    @GetMapping("/send/object")
    public void sendObject(){
        OrderEntity order = new OrderEntity();
        order.setId(10000L);
        order.setOrderNo(String.valueOf(System.currentTimeMillis()));
        order.setAmount(new BigDecimal("1999.99"));
        order.setCreateTime(new Date());
        refundNotifySenderService.sender(order);
    }
}
